<!-- include tpl=head_lay -->
<div class="layui-card">
	<div class="layui-card-header" style="padding:5px 5px 0 5px;">
		<form method="post" id="postsave" class="layui-form" onsubmit="return $.admin_order_payment.add({$rs.id})">
		<ul class="layout">
			<li>
				<div class="layui-form-item">
					<div class="layui-input-inline auto gray lh38">&nbsp; {lang添加支付记录}</div>
				</div>
			</li>
			<li>
				<select name="payment_id" lay-filter="payment">
				<option value="">{lang支付方式…}</option>
				<option value="other">{lang自定义支付名称}</option>
				<!-- loop from=$paylist key=$key value=$value id=$tmpid -->
				<optgroup label="{$value.title}{if $value.wap}_{lang手机端}{/if}">
					<!-- loop from=$value.rslist key=$k value=$v id=$idxx -->
					<option value="{$v.id}"{if $paytype == $v.id} selected{/if}>{$v.title}<!-- if $v.wap -->_{lang手机端}<!-- /if --></option>
					<!-- /loop -->
				</optgroup>
				<!-- /loop -->
				</select>
			</li>
			<li class="hide"><input type="text" name="title" value="" placeholder='{lang支付名称}' class="layui-input" /></li>
			<li>
				<div class="layui-form-item">
					<label class="layui-form-label">
						{$currency.title} {$currency.symbol_left}
					</label>
					<div class="layui-input-inline">
						<input type="text" name="price" id="price" value="{$unpaid_price}" placeholder='{lang支付金额}' class="layui-input" />
					</div>
					<div class="layui-input-inline auto gray lh38">{$currency.symbol_right}</div>
				</div>
				
			</li>
			<li><input type="text" name="dateline" id="dateline" placeholder='{lang支付时间}' class="layui-input" readonly /></li>
			<li><input type="text" name="note" placeholder="{lang备注}" class="layui-input" /></li>
			<li>
				<div class="layui-form-item">
					<input type="submit" value="{lang添加}" class="layui-btn layui-btn-sm" />
				</div>
			</li>
		</ul>
		</form>
	</div>
	<div class="layui-card-body">
		<table class="layui-table">
			<thead>
			<tr>
				<th>ID</th>
				<th>{lang支付方式}</th>
				<th>{lang支付金额}</th>
				<th>{lang支付时间}</th>
				<th>{lang其他}</th>
				<th>&nbsp;</th>
			</tr>
			</thead>
			<!-- loop from=$loglist key=$key value=$value id=$tmpid -->
			<tr>
				<td>{$value.id}</td>
				<td>{$value.title}</td>
				<td>{func price_format $value.price $rs.currency_id $rs.currency_id}</td>
				<td><!-- if $value.dateline -->{func time_format $value.dateline}<!-- else -->{func time_format $value.startdate}<!-- /if --></td>
				<td>
					<!-- if $value.ext && is_array($value.ext) -->
					<!-- loop from=$value.ext key=$k value=$v id=$tmpid2 -->
					<div>{$k}：{$v}</div>
					<!-- /loop -->
					<!-- else -->
					{$value.ext}
					<!-- /if -->
				</td>
				<td><input type="button" value="{lang删除}" class="layui-btn layui-btn-danger" onclick="$.admin_order_payment.del('{$value.id}','{$rs.id}')" /></td>
			</tr>
			<!-- /loop -->
		</table>	
	</div>
</div>

<!-- include tpl=foot_lay -->